<template>
	<view class="row-center inline-flex" @click="toggle" :class="extraClass || ''">
		<text
			class="iconfont text-xl mr-1 color-primary"
			:class="[value ? 'icon-gouxuan' : 'icon-weixuanze']"
		></text>
		<text class='text-n color-main'><slot></slot></text>
	</view>
</template>

<script setup>
import { onMounted, ref, watch, watchEffect, computed } from 'vue';
const props = defineProps({
	extraClass: String,
	value: [Boolean, Number],
});
const emits = defineEmits(["update:value", "touch"]);
function toggle(){
	emits("update:value", !props.value);
	emits("touch");
}
</script>
